Streaming graph display system with anomaly detection

ABSTRACT

A computer-implemented method, system, and computer program product are provided for a streaming graph display system with anomaly detection. The method includes receiving, by a processor, data or signals for creating a streaming graph. The method also includes creating, by the processor, a streaming graph from a plurality of vertices and edges in the data or the signals. The method additionally includes identifying, by the processor, an anomaly in the streaming graph based on a distance between edge codes and all current cluster centers determined by the plurality of vertices and edges. The method further includes controlling, by the processor, an operation of a processor-based machine to change a state of the processor-based machine, responsive to the anomaly. The method also includes displaying the streaming graph with the anomaly to a user.

RELATED APPLICATION INFORMATION

This application claims priority to U.S. Provisional Patent Application Ser. No. 62/508,408 filed on May 19, 2017, incorporated herein by reference herein its entirety. Moreover, this application is related to commonly assigned U.S. Patent Application Serial No. TBD (Attorney Docket Number 17012A), filed concurrently herewith and incorporated herein by reference.

BACKGROUND Technical Field

The present invention relates to streaming graphs and more particularly anomaly detection in streaming networks.

Description of the Related Art

Graph embedding with a neural network technique is a natural method to represent the evolutionary structure of networks as vector representations because of its ability to leverage the structural correlations among the edges and vertices in the network. The streaming nature of this problem is challenging because of the high rate of the incoming stream, and the need to perform fast real-time detection with bounded memory usage.

SUMMARY

According to an aspect of the present principles, streaming graph display system with anomaly detection is provided. The streaming graph display includes a receiver to receive data or signals for creating a streaming graph. The streaming graph display also includes a display to show a user the streaming graph with the anomaly. The streaming graph display further includes a processing system having a processor and memory coupled to the processor. The processing system programmed to receive a plurality of vertices and edges to create the streaming graph and identify an anomaly in the streaming graph based on a distance between edge codes and all current cluster centers determined by the plurality of vertices and edges. The processing system is also programmed to control an operation of a processor-based machine to change a state of the processor-based machine, responsive to the anomaly.

According to another aspect of the present principles, a computer-implemented method for a streaming graph display system with anomaly detection is provided. The method includes receiving, by a processor, data or signals for creating a streaming graph. The method also includes creating, by the processor, a streaming graph from a plurality of vertices and edges in the data or the signals. The method additionally includes identifying, by the processor, an anomaly in the streaming graph based on a distance between edge codes and all current cluster centers determined by the plurality of vertices and edges. The method further includes controlling, by the processor, an operation of a processor-based machine to change a state of the processor-based machine, responsive to the anomaly. The method also includes displaying the streaming graph with the anomaly to a user.

According to yet another aspect of the present principles, a computer program product is provided for demand charge management. The computer program product comprising a non-transitory computer readable storage medium having program instructions. The program instructions executable by a computer to cause the computer to perform a method. The method includes receiving, by a processor, data or signals for creating a streaming graph. The method also includes creating, by the processor, a streaming graph from a plurality of vertices and edges in the data or the signals. The method additionally includes identifying, by the processor, an anomaly in the streaming graph based on a distance between edge codes and all current cluster centers determined by the plurality of vertices and edges. The method further includes controlling, by the processor, an operation of a processor-based machine to change a state of the processor-based machine, responsive to the anomaly. The method also includes displaying the streaming graph with the anomaly to a user.

These and other features and advantages will become apparent from the following detailed description of illustrative embodiments thereof, which is to be read in connection with the accompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

The disclosure will provide details in the following description of preferred embodiments with reference to the following figures wherein:

FIG. 1 is a block diagram of an exemplary environment to which the present invention can be applied, in accordance with an embodiment of the present invention;

FIG. 2 is a block/flow diagram illustrating an example of an anomaly detection workflow in graph streams, in accordance with an embodiment of the present invention;

FIG. 3 is a block/flow diagram illustrating a skipgram model, in accordance with an embodiment of the present invention;

FIG. 4 is illustrating different values of a new centroid after introducing a decay factor, in accordance with an embodiment of the present invention;

FIG. 5 shows a block/flow diagram illustrating a real-time anomaly detection method in streaming networks, in accordance with an embodiment of the present invention;

FIG. 6 shows a block diagram of an exemplary environment to which the present invention can be applied, in accordance with an embodiment of the present invention;

FIG. 7 shows a block diagram of an exemplary environment to which the present invention can be applied, in accordance with an embodiment of the present invention;

FIG. 8 is a block diagram illustrating a method for anomaly detection in a streaming network, in accordance with an embodiment of the present invention; and

FIG. 9 shows a block diagram of a computer processing system, to be used to reconfigure the ROSS or for control purposes, in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Massive streaming graphs arise in many areas such as public health, security and social media. Given the graph streams, it is useful to detect structural anomalous objects such as vertices and edges which are distant from other objects in the underlying network in real-time. The problem of detecting the graph anomalies (edges or vertices) that are significantly different from the underlying graph streams that has been observed so far is described. Such anomalies represent deviations from “normal” structural patterns in the graph streams. A framework employed for anomaly detection in graph streams by learning graph representations which can be updated incrementally as new edge(s) arrive is described.

In public health domains, anomaly detection can work with patient records. The data can include records which may have several different types of entities (vertices) such as patients, symptoms and treatments which can be modeled as a multipartite graph that represents the relationship among these entities. The graph can have anomalies due to several reasons such as abnormal patient condition and recording errors.

The advanced persistent threat (APT) detection problem in security can also be cast as real-time anomaly detection in graph streams. In APT scenario, a stream of system logs are given that can be used to construct information flow graphs. And the information flow induced by malicious activities are sufficiently different from the normal behavior of the system.

With the popularity of social media, anomalous behaviors arise based on the underlying social networks. The malicious activities such as cyber bullying, terrorist attack planning and fraud information dissemination can be detected as anomalies using graph anomaly detection models.

Graph embedding with neural network technique is a natural method to represent the evolutionary structure of networks as vector representations because of its ability to leverage the structural correlations among the edges and vertices in the network. This opens the possibility of using clustering-based algorithms for anomaly detection in graph streams. In general, graph anomalies in the multidimensional space may be represented far away from the “normal” graph clusters, which can be detected by dynamic clustering algorithms as graph objects are received over time. The streaming nature of this problem is challenging because of the high rate of the incoming stream, and fast real-time detection must be performed bounded by memory usage.

A clustering based anomaly detection method can include one or more of several two procedures, e.g., graph sketching and anomaly detection based on the sketches. The sketches can be learned by hashing such as locality-sensitive hashing and Count-Min sketch. The graph sketches or representations allow efficient updates as new graph objects arrive in the stream without maintaining the full graph structure. Existing anomaly detection approaches are not, at least directly, designed to learn the graph sketches by preserving the neighborhood information extracted from vertices.

Referring now in detail to the figures in which like numerals represent the same or similar elements and initially to FIG. 1, shows a block diagram of an exemplary environment 10 to which the present invention can be applied, in accordance with an embodiment of the present invention. The environment 10 is representative of a streaming graph network to which the present invention can be applied. The elements shown relative to FIG. 1 are set forth for the sake of illustration. However, it is to be appreciated that the present invention can be applied to other network configurations and other operational environments as readily contemplated by one of ordinary skill in the art given the teachings of the present invention provided herein, while maintaining the spirit of the present invention.

The environment 10 includes at least one sensor system or device 20 and at least one display system 30. For the sake of simplicity and illustration, the preceding elements are shown in singular form, but can be readily extended to more than one of any of the preceding elements as readily appreciated by one of ordinary skill in the art given the teachings of the present invention provided herein, while maintaining the spirit of the present invention. The at least one sensor system or device 20 and at least one display system 30 can be part of a computer processing system, which can be any type of computer processing system including, but not limited to, servers, desktops, laptops, tablets, smart phones, media playback devices, and so forth, depending upon the particular implementation.

The at least one sensor system or device 20 can include one or more processors 22 (hereinafter “processor”), one or more sensors 24 (hereinafter “sensor”), and a transceiver 26. The processor 22 can correlate, process, or modify data from the sensor 24. In an embodiment, the sensor 24 may include one or more of the following: an optical sensor; an infrared (IR) sensor; a camera; an accelerometer or other motion sensor; an electrochemical gas sensor or other gas sensor; a thermocouple; a thermistor; a resistance thermometer; a silicon bandgap temperature sensor or other temperature sensor; and/or other sensing devices. The sensor 24 can provide a stream of data to the processor 22 which can be used to for a streaming graph. This streaming graph can move and change as the environment the sensor 24 is measuring changes.

The at least one sensor system or device 20 can send the data for the streaming graph to the at least one display system 30 with the transceiver 26. In one embodiment, the transceiver 26 may be coupled to a global position system (GPS) to determine a position of the at least one sensor system or device 20 relative to other at least one sensor system or device 20 on a common coordinate system. The transceiver 26 may be equipped to communicate with a cellular network system. In this way, at least one sensor system or device 20 can communicate with anything that is connected to the cellular network, such as, e.g., but not limited to, the Internet. In one embodiment, the cellular network system may be the communication link between at least one sensor system or device 20. In another embodiment, the cellular network system may be the communication link between the at least one sensor system or device 20 and the at least one display system 30. The transceiver 26 may include a WIFI or other radio system, a local area network, a wide area network, and so forth.

The at least one display system 30 can include one or more processors (not shown), a transceiver (not shown), a memory (not shown), and a display 40. In one embodiment, the at least one display system 30 can be a computer. The display 40 can show a streaming graph 50 received from the at least one sensor device 20. The streaming graph 50 has edges and vertices. The edges and vertices of the streaming graph 50 can be outside a normal range and be an anomaly. The memory of the at least one display device can include programming for detecting anomalies in a streaming graph. This anomaly detection software can analyse the graph to find the outliers to: e.g., notify a user of the anomaly, change the state in a processor controlled device, turn on an air scrubber in a laboratory environment, or activate security measures, e.g., sound alarms, lock doors, summon security personnel or law enforcement, stream video offsite to a central security office, etc. The at least one display device with anomaly detection technology can be used in: e.g, medical setting, laborator setting, plants or factories, school or universities, etc.

The anomaly detection problem in graph streams can be addressed by introducing a new clustering based approach that 1) can incrementally update graph representations as new edges arriving, 2) dynamically maintains the clusters, and 3) detects anomalies in graph streams in real-time. Referring to FIG. 2, a block/flow diagram illustrating an example of an anomaly detection workflow in graph streams. The graph codes 130 are learned from the graph walks 120 extracted from the initial graph 110. The graph walks 120 are generated based on the consideration of the first-order and second-order proximities which can better preserve the local and global structure of the graph 110. Then a clustering tree 140 is built based on the vertices or edges codes 150. A clustering based approach is employed to score and flag anomalous vertices or edges 160. The effectiveness and efficiency of the proposed framework on read world datasets is quantitatively validated.

A novel anomaly detection framework is described, which learns vector representations for vertices and edges and detects graph deviations based on dynamic clustering algorithm. Additionally, an efficient algorithm for graph code learning based on neural network embedding is described. It can accurately and quickly encode the streaming graph objects. The graph codes learned can capture the clustering structure of the original graph, which is ideal for the clustering-based anomaly detection module. It is easier to maintain graph codes incrementally in streaming settings. For the new streaming edge(s), it only takes logarithmic time O(log(n)) to generate new graph walks. Existing approaches are not applicable to the motivating scenario as they do not exhibit all of the desired properties simultaneously. The anomaly detection framework is faster: i) the number of graph walks is smaller; ii) the length of graph walks is shorter which leads to a small window size in vertex representation learning. For graphs which have high density, the possible accelerate strategy is to down sample the graph walks on the second order neighborhood structure of the vertices.

The notations used are summarized in Table 1.

TABLE 1 Notations Description Notation Descriptions G(E, V) graph with a edge set E and a vertex set V E^((t)) streaming edge(s) at time-stamp t V^((t)) new vertex set at time-stamp t n number of vertices |V | m number of edges G(E, V) l graph walk length d latent dimension of vertex representation D latent dimension of edge representation, D = 2 × d F n × d feature matrix, also called graph codes F_(i) d-dimensional representation of vertex v_(i) Ω graph walk set of G(E, V) Ω(v) graph walk set start from vertex v Γ edge representation of graph G(E, V), ∈ m × D Γ_(i) D-dimensional representation of edge e_(uv) W encoding paramenter matrix ∈ R^(n×d) W′ decoding parameter matrix ∈ R^(d×n)

Given a graph G(E, V), the incoming stream of graph objects at time-stamp t are assumed an edge or small graph object denoted by an edge list E^((t)) where |E^((t))|≥1. The vertex set in the edge list E^((t)) at time-stamp t is denoted by V^((t)). The vertex set V is the union of the vertex sets across all time-stamps, that is V=∪{V^((t))}_(t=1) ^(∞). Similarly, E=∪{E^((t))}_(t=1) ^(∞). Note that the entire vertex set V is not known to us at time-stamp t, which means new vertices will be created at time-stamp t′ for any t′>t. The graph at time-stamp t is denoted as G^((t)), which includes all edges and small graphs received from time-stamp 1 to t.

The goal is to detect anomalous vertices, edges and communities (group of vertices) at any given time t, i.e., in real time as E^((t)) occurs. To achieve this goal, the graph G^((t)) is encoded as a feature matrix, where the rows are vector representations of vertices. The main challenges are, i) the need to find a way to encode the graph streams, ii) the new graph objects can be easily coded by the learned graph codes, iii) the graph codes need to be updated accordingly as new graph objects received. A clustering-based approach is followed to detect the anomalies in graph streams. The clusters are built based on the learned feature matrix, and score an incoming or updated graph by measuring the distance between its code and the existing clusters. This clustering method needs to be updated efficiently as new graph objects received.

In order to detect the anomalies in graph streams in real time, the method can learn graph codes and perform online updates efficiently with new edges arriving in an infinite stream.

Analogous to using word embedding technique to construct the vector representations, the graph is decomposed into a set of graph walks which contain a list of vertices derived by breadth-first search. Graph walks is for a given vertex v∈V in graph G(E,V), its graph walks are defined as Ω(v)={(v, s, u)|(v, s)∈E Λ(s, u)∈E}, which is a collection of two-hop walks start from vertex v. Ω={Ω(v)}_(v∈V) is called graph walks.

The graph walks are generated using breadth-first search over the entire vertex set of the graph and then considering only those walks whose length is three. Note that in Algorithm 1, there is no need to mark if a vertex has been visited before or not, since the walks are used to capture the local graph structures. For directed graph, the same search routines work essentially unmodified. The only difference is that when exploring a vertex v, it only looks at edges (v, s) going out of v; and ignores the other edges coming into v.

Algorithm 1 Graph Walks Generation Input: G(E,V). Output: Graph walk set Ω. 1. Set graph walk set Ω = Ø. 2. for each v ∈ V do 3. Set list S = Ø. 4. add s to S if (v,s) ∈ E. 5. for each s ∈ S do 6. add (v,s,u) to graph walk set Ω. 7. end 8. end

Different from DeepWalk which uses random walks to learn vertex representation, the graph walks used are the graph walks derived by breadth-first search on graph G (E, V). The advantages of using graph walks can including the following:

-   -   The graph walks are unique in the given G (E, V). Therefore the         learned graph codes are consistent and reproducible. Conversely,         the random walks are unpredictable in DeepWalk.     -   The frequency which vertices appear in graph walks also show         power-law distribution. This distribution is similar to the word         frequency in natural language. It builds the connection between         techniques from language modeling which account for this         distributional behavior and vertex representation learning with         graph walks.     -   The graph codes learned captures the clustering structure of the         original graph, which is ideal for the clustering-based anomaly         detection module.     -   It is easier to maintain graph codes incrementally in streaming         settings. For the new streaming edge(s), it only takes         logarithmic time O(log(n)) to generate new graph walks. Existing         approaches are not applicable to the motivating scenario as they         do not exhibit all of the desired properties simultaneously.     -   This process is faster: i) the number of graph walks is         smaller, ii) the length of graph walks is shorter which leads to         a small window size in vertex representation learning. For         graphs which have high density, the possible accelerate strategy         is to down sample the graph walks on the second order         neighborhood structure of the vertices.     -   Other features are also contenplated.

The reason graph walks are used instead of graph random walks is that the graph walks have the first-order proximity and second-order proximity information between the vertices. This is different from the language models. For example, Given the sentence Github is very important to programmers, a window size of 5 is needed to capture the relationship between “Github” and “programmers”. However, in the graph walks. The “semantically” related vertices stay closer to each other, which can be determined through the observed tie strength and through the shared neighborhood structures of the vertices.

This connection to local and global network structure can motivate the use of a stream of graph walks as the basic tool for extracting information from a network. The Skip-gram architecture is then deployed, which has been originally developed to model natural language to learn vertex representations in graph.

The graph codes learning problem is formulated as a maximum likelihood optimization problem. The goal is to learn a mapping function ƒ: V→R^(d) that each v∈V can be represented as an d dimensional vector, where d is the latent dimension of vertex representation. This mapping function ƒ applies to any (un)directed, (un)weighted graph. The Skip-gram architecture is leveraged to learn the vector representation of vertices through a stream of graph walks. Skip-gram is similar to an auto-encoder, encoding each word in a vector, but training against the neighboring words in the input corpus. In the problem setting, the graph walks can be viewed as short sentences and the vertices are the words. The direct analog is to estimate the likelihood of observing vertex v given all the vertices in the graph walks.

As an example, consider the graph walk u→s→v, the ‘context’ is defined as the window of vertices to the left and to the right of a target vertex. Here the window size of 1 is used, and then the (context, target) has pair ([u, v], s). According to skip-gram which tries to predict each context vertex from its target vertex. Thus the (input, output) dataset becomes (s, u) and (s, v). FIG. 3 shows the skipgram model 300 used in the vertex representation learning.

The inputs 310 and outputs 320 are one-hot encoded vectors, that is, for a given vertex input x={x₁, x₂, . . . , x_(n)}, only one out of n elements will be 1, and all others are 0. The goal is to learn a latent representation for each input vertex vector x. On the output layer of FIG. 3, the outputting C multinomial are distributions (C=2 in our problem setting). The conditional probability of each output is computed as:

$\begin{matrix} {{p\left( {w_{c,j} = \left. w_{O,c} \middle| w_{I} \right.} \right)} = \frac{\exp \left( u_{c,j} \right)}{\Sigma_{j^{\prime} = 1}^{n}{\exp \left( u_{j^{\prime}} \right)}}} & (1) \end{matrix}$

where w_(c,j) is the j^(th) vertex in the vertex vocabulary on the c^(th) context of the output layer; w_(0,c) is the actual c^(th) context vertex vector; w_(I) is the input vertex; u_(c,j) is the network feedforward result of the j^(th) vertex on the c^(th) context. Here u_(c,j)=u_(j)=W_(j)′ ·F. The objective function is optimized which is defined over the entire dataset:

$\begin{matrix} {E = {{\log \mspace{14mu} {p\left( {w_{O,1},w_{O,2},\ldots,\left. w_{O,c} \middle| w_{I} \right.} \right)}} = {{- \log}\; \Pi_{c = 1}^{C}\frac{\exp \left( u_{c,j_{c}^{*}} \right)}{\Sigma_{j^{\prime} = 1}^{n}{\exp \left( u_{j^{\prime}} \right)}}}}} & (2) \end{matrix}$

where u_(c,j) _(c) _(*) is the actual c^(th) output context. For the update of Equation (2), in order to update, all vertices have to be itereated through in the graph for each training instance. The training computation is very expensive, and make it impractical to process large scale graphs. To solve this problem, hierarchical softmax or negative sampling can be used to limit the number of vectors that need to be updated per training instance.

The pseudocode for graph encoding given in Algorithm 2. Starting from every vertex∈V, all graph walks are generated via Algorithm 1. Then graph codes are learned by optimizing the aforementioned loss function.

Algorithm 2 Graph Encoding Input: G(E,V). Output: Graph walk set Ω. // initial graph codes learning 1. Set graph walk set Ω = Ø. 2. for each v ∈ V do 3. Set list S = Ø. 4. add s to S if (v,s) ∈ E. 5. for each s ∈ S do 6. add (v,s,u) to graph walk set Ω. 7. end 8. end // streaming edges processing // anomaly detection

The algorithm learns vector representations for vertices in a graph. This allows it to detect vertex anomalies based on clustering algorithms. However, it is also interested in edge anomalies detection. Therefore, in order to make the decision on whether an incoming edge is an anomaly, it builds a lookup table to perform new edge(s) encoding in real-time based on the graph codes learned. Assume the graph codes learned by Algorithm 2 are F∈R^(n×d), each vertex v_(i) is encoded as a d-dimension vector F_(i). For each new edge e_(uv) where u is the source vertex, and v is the destination vertex, it will be encoded as [F_(u), F_(v)]. The edge list codes are denoted as E∈R^(m×D), where m is the number of edges, D=2×d. Euclidean distance is used to measure similarity between two edge codes.

Given two edges e_(i)(u_(i),v_(i)) and e_(j)(u_(j),v_(j)), the similarity between edges e_(i), e_(j) and the similarity between corresponding source vertices u_(i), u_(j) and destination vertices v_(i),v_(j) satisfy sim(e_(i),e_(j))²=sim(u_(i),u_(j))²+sim(v^(i),v_(j))².

Let E_(i), E_(j), F_(ui), F_(uj), F_(vi), F_(vj) be the codes of the aforementioned edges and vertices. Then the Euclidean distance between edges e_(i) and e_(j) can be calculated as:

$\begin{matrix} {{{sim}\left( {e_{i},e_{j}} \right)}^{2} = {\left. ||{E_{i} - E_{j}} \right.||^{2} = \left. ||{\left\lbrack {F_{ui},F_{uj}} \right\rbrack - \left\lbrack {F_{vi},F_{vj}} \right\rbrack} \right.||^{2}}} \\ {{= \left. ||{F_{ui} - F_{vi}} \right.},\left. {F_{uj} - F_{vj}} \right.||^{2}} \\ {= \left. ||{F_{ui} - F_{vi}}||{}_{2}{+ \left. ||{F_{uj} - F_{vj}} \right.||^{2}} \right.} \end{matrix}$

which is equal to sim(u_(i),u_(j))²+sim(v_(i),v_(j))².

The above shows that Euclidean similarity between two encoded edges is proportional to the similarity between corresponding source vertices and destination vertices. Thus the following is derived:

Given two edges e_(i)(u, v_(i)) and e_(j)(u, v_(j)) start from the same source vertex u. The edge similarity will increase if and only if the similarity of v_(i) and v_(j) increases.

Since the anomaly detection procedure is based on a clustering approach, it defines the way to encode edge over the vertex representations which has the property described above. The motivation behind this is that, if the vertices are from the same cluster, the edges between them are more likely to stay in the same cluster, and vice versa. Note that, the way to encode edges is very flexible. The process can add additional edge specific features to extend the current edge vectors. There are other edge encoding methods using the representations of individual vertex [ ]. These methods extend the vertex representations to pairs of vertices which represent edges.

The graph codes learned are dynamically maintained on the arrival of new edges in the stream. Each new edge brings a number of new graph walks which will be used to update the existing graph codes. For each new incoming edge (u, v), the stream graph walks are defined as Ω_(s)={(u, v, w)|(v, w)∈E, v≠w}Λ{(w, u, v)|(w, u)∈E, u≠w}, which is a collection of graph walks containing the new incoming edge (u, v).

If the vertices in the incoming edge (u, v) are new. Then the vertex vocabulary needs updating by adding the new vertices. Then the model can be continued to be trained with new graph walks ω_(s). The pseudocode of updating graph codes is listed below:

Algorithm 3 Graph Codes Updating Input: Output: 1. update vertex vocabulary 2. load the saved model 3. train the model with stream graph walks Ωs 4. update graph code matrix F

The graph codes of the streaming graph can be updated without maintaining the entire graph structure explicitly. For each new arriving edge (u, v), the new graph walks are generated by checking the start/end vertices of the original graph walks. If the graph walks are sorted, then the searching time is O(log(N)) where N is the total number of graph walks.

When the model is retrained with the new graph walks, the weights of the old vocabulary are used, and reset the weights of new vocabulary in the Skip-gram architecture.

The process is able to detect both edge and vertex anomalies. The anomaly detection problem in graph streams is defined as: given the vertex representations F∈R^(n×d) or edge representations G∈R^(m×D), the need to find a way to group them into k clusters of similar objects, and find the vertices or edges that do not naturally belong to any existing cluster. These data points are reported as anomalies.

The concept of clustering feature vector is extended to temporal setting. The temporal clustering feature vector is defined as given n d dimension data points {x_(i)}_(i=1) ^(n) with timestamps in a cluster C, the temporal clustering feature (TCF) vector of this cluster is defined as a triple: TCF=(n, c, t_(max)), where n is the total number of data points in the cluster, c is the centroid of this cluster, and t_(max) is the latest timestamp of any point in this cluster.

Note that only TCF vector is stored as a summary of each cluster. This summary is very efficient and scalable because there is no need to store all data points. Furthermore, since the downstream task is to detect anomalies, there is no split or merge clusters, thus no need to store more measurements such as radius or diameter of clusters.

When new point(s) arrive, there is a need to find a way to update c and t_(max). Assume that there are n₀ points {x_(i)}_(i=1) ^(n) ⁰ in the existing cluster, and n′ new points {x_(i)}_(i=1) ^(n′) at timestamp T′ will be absorbed by this cluster. In the model, a decay factor δ is introduced when calculating the new centroid after absorbing new point(s). δ is a parameter to measure the importance of the “old” data points in the existing cluster. The centroid c then updated as follows:

$\begin{matrix} {{c = {{\lambda_{old}{\sum\limits_{i = 1}^{n}\; x_{i}}} + {\lambda_{new}{\sum\limits_{i = 1}^{n^{\prime}}\; x_{i}^{\prime}}}}}\mspace{56mu}} & (3) \\ {{= {{\lambda_{old} \times c_{old} \times n_{0}} + {\lambda_{new}{\sum\limits_{i = 1}^{n^{\prime}}\; x_{i}^{\prime}}}}}{{{{where}\mspace{14mu} \lambda_{old}} = {\frac{1}{n_{0} + n^{\prime}} \times \delta^{|{T^{\prime} - T_{\max}}|}}},{\lambda_{new} = {\frac{1 - {\lambda_{old} \times n_{0}}}{n^{\prime}}.}}}} & (4) \end{matrix}$

After updating the centroid, T_(max) in TCF is updated as max{T′, T_(max)}. The new TCF will be

$\begin{matrix} {{TCF} = \left( {{n_{0} + n^{\prime}},{{\lambda_{old}{\sum\limits_{i = 1}^{n_{0}}\; x_{i}}} + {\lambda_{new}{\sum\limits_{i = 1}^{n^{\prime}}\; x_{i}^{\prime}}}},{\max \left\{ {T^{\prime},T_{\max}} \right\}}} \right)} & (5) \end{matrix}$

The new centroid c lays in the convex hull formed by all n₀+n′ data points.

The convex hull of a set of points S in d dimensions is the intersection of all convex sets containing S. For |S| points x₁, x₂, . . . , the convex hull H is then given by the expression

$\begin{matrix} {H = \left\{ {\left. {\sum\limits_{j = 1}^{|S|}\; {\lambda_{j}x_{j}}} \middle| {\left( {\forall{{j\text{:}\lambda_{j}} \geq 0}} \right)\bigwedge{\sum\limits_{j = 1}^{|S|}\; \lambda_{j}}} \right. = 1} \right\}} & (6) \end{matrix}$

And the problem setting,

$\begin{matrix} {{{\sum\limits_{j = 1}^{N}\; \lambda_{j}} = {{{n_{0}*\lambda_{old}} + {n^{\prime}*\lambda_{new}}} = 1}},{\lambda_{old} \geq 0},{\lambda_{new} \geq 0}} & (7) \end{matrix}$

Thus the new centroid c=λ_(old) Σ_(i=1) ^(n) ⁰ x₁+λnew Σ_(i=1) ^(n′) x″_(i) lays in the convex hull formed by all points in the new cluster.

FIG. 4 depicts the different values of new centroid x_(c) ^(new) after introducing decay factor δ. Assume the original cluster contains three points (1,1), (2,2) and (3,1). Point (6,2) is the new arriving one. x_(c) ^(old) is calculated based on the original cluster. If there is no decay factor (δ=1), then the updated centroid is the calculated by averaging all these four points. However, if the decay factor δ introduced, the centroid will move to the new point (6,2) as δ decreasing. In this case, more weight is assigned on the new arrival points.

The process maintains a collection of data statistics in the clustering stage so that it can be effectively used in the streaming setting. Initially, the training data points collected from the initial graph are grouped into k clusters using k-means algorithms. The TCF vectors are calculated for each cluster.

When new points (vertices or edges) at timestamp T arrive, the closest cluster to each point x′_(i) is found. The similarity measure used is a Euclidean distance which is given by D=∥c−x′_(i)∥₂. In many cases, the point x′_(i) does not naturally belong to any existing cluster. For example:

-   -   x′_(i) corresponds to an anomaly.     -   x′_(i) is the beginning of a new cluster in the data stream.

It's hard to distinguish the above cases until more data points are received. So in the model, an anomaly threshold α is defined. If the distance D is larger than α, a new cluster for the point x′_(i) is created, and the corresponding TCF equals (1, x′_(i),T). If the data point falls with the anomaly threshold, it will be added to the closest cluster and all entries in TCF of this cluster will be updated using Eq. (5). The anomaly score of each point is reported as the closest distance to the centroids of existing clusters.

With k clusters described by k TCF vectors, finding the nearest cluster takes O(kd) time. And it also takes O(d) time to compute the anomaly score for each data point. Updating the TCF vector takes O(d+2) time with respect to the dimension of the TCF vector. Thus the total time complexity in anomaly detection part is O(kd) for each incoming data point. The only thing needs to be keep in the memory in the TCF vectors, leading to a total space complexity of O(kd) for clustering and anomaly detection.

FIG. 5 shows a block/flow diagram illustrating a real-time anomaly detection method 500 in streaming networks, in accordance with an embodiment of the present invention. The real-time anomaly detection method 500 in streaming networks can have a historical graph sequence in block 505. Block 505 can feed in to block 510 that updates a vertex vocabulary. Block 510 can build a vertex vocabulary by indexing with incremental order. Block 510 can use both the historical graph sequence from block 505 and new vertex from block 530. Block 510 can feed into block 520 to learn graph codes.

Block 520 can learn graph codes by transforming vertex to vectors using a Skip-gram model. The graph codes learning problem is formulated as a maximum likelihood optimizaion proble. For scalability issues, hierarchiical softmax or negative sampling is employed to limit the number of vectors that need to be updated per training instance. New edges come out of block 520 and can feed into block 530 to encode edges.

Block 530 builds a lookup table to perform new edge(s) encoding in real-time based on the learned graph codes. Assume the graph codes learned Skip-gram algorithm is F, each vertex vi is encoded as a d-dimension vector F. For each new edge e_(uv) where u is the source vertex, and v is the destination vertex, it will be encoded as [F_(u), F_(v)]. The edge list codes are denoted as E, where m is the number of edges. Euclidean distance is employed to measure similarity between two edge codes. New and not new vertex can come out of block 530. The new vertex can feed back into block 510. The not new vertex can feed into a clustering tree in block 540.

Block 540 can employ the temporal clustering feature (TCF) vector, which is a triple to profile each. A collection of data statitstics can be manintened in the clustering stage so that it can be effectively used in the streaming setting. Initially, the training data points collected from the initial graph are grouped into k clusters using k-means algorithms. The TCF vectors are calculated for each cluster. Block 540 can feed into block 550 for real-time anomally detection. Block 550 detects an anomally if the new vertex or edges are far from all current clustering centers.

FIG. 6 shows a block diagram of an exemplary environment 600 to which the present invention can be applied, in accordance with an embodiment of the present invention. The environment 600 is representative of a computer network to which the present invention can be applied. The elements shown relative to FIG. 6 are set forth for the sake of illustration. However, it is to be appreciated that the present invention can be applied to other network configurations and other operational environments as readily contemplated by one of ordinary skill in the art given the teachings of the present invention provided herein, while maintaining the spirit of the present invention.

The environment 600 at least includes at least one safety system or device 602, at least one fault detection system 605, at least one computer processing system 610, at least one controlled system(s), machine(s), and/or device(s) (individually and collectively denoted by the reference numeral 620 and hereinafter referred to as “controlled system, machine, and/or device”). For the sake of simplicity and illustration, the preceding elements are shown in singular form, but can be readily extended to more than one of any of the preceding elements as readily appreciated by one of ordinary skill in the art given the teachings of the present invention provided herein, while maintaining the spirit of the present invention. The computer processing system 610 can be any type of computer processing system including, but not limited to, servers, desktops, laptops, tablets, smart phones, media playback devices, and so forth, depending upon the particular implementation. For the sake of illustration, the computer processing system 610 is a server.

The at least one anomaly detection system 605 is configured to detect one or more anomalies. The computer processing system 610 is configured to perform anomaly detection on streaming networks. Moreover, the computer processing system 610 is configured to initiate an action (e.g., a control action) on the controlled system, machine, and/or device 620 responsive to the detected anomaly. Such action can include, but is not limited to, one or more of: powering down the controlled system, machine, and/or device 620 or a portion thereof; powering down, e.g., a system, machine, and/or a device that is affected by an anomaly in another device, stopping a centrifuge being operated by a user 620A before an imbalance in the centrifuge causes a critical failure and harm to the user 620A, opening a valve to relieve excessive pressure (depending upon the anomaly), locking an automatic fire door, and so forth. As is evident to one of ordinary skill in the art, the action taken is dependent upon the type of anomaly and the controlled system, machine, and/or device 620 to which the action is applied.

The safety system or device 602 can implement the aforementioned or other action. The safety system or device 602 can be a shut off switch, a fire suppression system, an overpressure valve, and so forth. As is readily appreciated by one of ordinary skill in the art, the particular safety system or device 602 used depends upon the particular implementation to which the present invention is applied. Hence, the safety system 602 can be located within or proximate to or remote from the controlled system, machine, and/or device 620, depending upon the particular implementation.

In the embodiment shown in FIG. 6, the elements thereof are interconnected by a network(s) 601. However, in other embodiments, other types of connections (e.g., wired, etc.) can also be used. Additionally, one or more elements in FIG. 6 may be implemented by a variety of devices, which include but are not limited to, Digital Signal Processing (DSP) circuits, programmable processors, Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), Complex Programmable Logic Devices (CPLDs), and so forth. These and other variations of the elements of environment 700 are readily determined by one of ordinary skill in the art, given the teachings of the present invention provided herein, while maintaining the spirit of the present invention.

FIG. 7 shows an exemplary environment 700 to which the present invention can be applied, in accordance with an embodiment of the present invention. The environment 700 is representative of a computer network to which the present invention can be applied. The elements shown relative to FIG. 7 are set forth for the sake of illustration. However, it is to be appreciated that the present invention can be applied to other network configurations as readily contemplated by one of ordinary skill in the art given the teachings of the present invention provided herein, while maintaining the spirit of the present invention.

The environment 700 at least includes a set of computer processing systems 710. The computer processing systems 710 can be any type of computer processing system including, but not limited to, servers, desktops, laptops, tablets, smart phones, media playback devices, and so forth. For the sake of illustration, the computer processing systems 710 include server 710A, server 710B, and server 710C.

In an embodiment, the present invention performs system fault diagnosis via efficient temporal and dynamic historical fingerprint retrieval on the computer processing systems 710. Thus, any of the computer processing systems 710 can perform system fault diagnosis via efficient temporal and dynamic historical fingerprint retrieval that produce a fault event, or accessed by, any of the computer processing systems 710. Moreover, the output (including corrective actions) of the present invention can be used to control other systems and/or devices and/or operations and/or so forth, as readily appreciated by one of ordinary skill in the art given the teachings of the present invention provided herein, while maintaining the spirit of the present invention.

In the embodiment shown in FIG. 7, the elements thereof are interconnected by a network(s) 701. However, in other embodiments, other types of connections can also be used. Additionally, one or more elements in FIG. 7 may be implemented by a variety of devices, which include but are not limited to, Digital Signal Processing (DSP) circuits, programmable processors, Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), Complex Programmable Logic Devices (CPLDs), and so forth. These and other variations of the elements of environment 700 are readily determined by one of ordinary skill in the art, given the teachings of the present invention provided herein, while maintaining the spirit of the present invention.

Referring now to FIG. 8, a block diagram illustrating a method for anomaly detection in a streaming network, in accordance with an embodiment of the present invention. In block 810, receive a plurality of vertices and edges from a streaming graph. In block 820, generate graph codes for the plurality of vertices and edges. In block 830, determine edge codes in real-time responsive to the graph codes. In block 840, identify an anomaly based on a distance between edge codes and all current cluster centers. In block 850, control an operation of a processor-based machine to change a state of the processor-based machine, responsive to the anomaly.

Referring now to FIG. 9, a block diagram of a computer processing system 1000, to be used to reconfigure the ROSS or for control purposes, is illustratively depicted in accordance with an embodiment of the present principles. The computer system 1000 includes at least one processor (CPU) 1005 operatively coupled to other components via a system bus 1002. A cache 1006, a Read Only Memory (ROM) 1008, a Random-Access Memory (RAM) 1010, an input/output (I/O) adapter 1020, a sound adapter 1030, a network adapter 1070, a user interface adapter 1050, and a display adapter 1060, are operatively coupled to the system bus 1002.

A first storage device 1022 and a second storage device 1029 are operatively coupled to system bus 1002 by the I/O adapter 1020. The storage devices 1022 and 1029 can be any of a disk storage device (e.g., a magnetic or optical disk storage device), a solid state magnetic device, and so forth. The storage devices 1022 and 1029 can be the same type of storage device or different types of storage devices.

A speaker 1032 may be operatively coupled to system bus 1002 by the sound adapter 1030. The speaker 1032 can sound an alarm when controlled. A transceiver 1075 is operatively coupled to system bus 1002 by network adapter 1070. A display device 1062 is operatively coupled to system bus 1002 by display adapter 1060.

A first user input device 1052, a second user input device 1059, and a third user input device 1056 are operatively coupled to system bus 1002 by user interface adapter 1050. The user input devices 1052, 1059, and 1056 can be any of a sensor, a keyboard, a mouse, a keypad, a joystick, an image capture device, a motion sensing device, a power measurement device, a microphone, a device incorporating the functionality of at least two of the preceding devices, and so forth. Of course, other types of input devices can also be used in the present invention. The user input devices 1052, 1059, and 1056 can be the same type of user input device or different types of user input devices. The user input devices 1052, 1059, and 1056 are used to input and output information to and from system 1000.

Of course, the computer system 1000 may also include other elements (not shown), as readily contemplated by one of skill in the art, as well as omit certain elements. For example, the devices described in FIGS. 2, 3, 5, 7, and 8 can be controlled by computer system 1000. For example, various other input devices and/or output devices can be included in computer system 1000, depending upon the particular implementation of the same, as readily understood by one of ordinary skill in the art. For example, various types of wireless and/or wired input and/or output devices can be used. Moreover, additional processors, controllers, memories, and so forth, in various configurations can also be utilized as readily appreciated by one of ordinary skill in the art. These and other variations of the computer system 1000 are readily contemplated by one of ordinary skill in the art given the teachings of the present invention provided herein.

Moreover, it is to be appreciated that network 600 and network 700 described above with respect to FIG. 6 and FIG. 7 are networks for implementing respective embodiments of the present invention. Part or all of computer processing system 1000 may be implemented in one or more of the elements of network 600 and/or one or more of the elements of network 700.

Further, it is to be appreciated that computer processing system 1000 may perform at least part of the method described herein including, for example, at least part of method 800 of FIG. 8.

Embodiments described herein may be entirely hardware, entirely software or including both hardware and software elements. In a preferred embodiment, the present invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc.

Embodiments may include a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. A computer-usable or computer readable medium may include any apparatus that stores, communicates, propagates, or transports the program for use by or in connection with the instruction execution system, apparatus, or device. The medium can be magnetic, optical, electronic, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. The medium may include a computer-readable storage medium such as a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk, etc.

Each computer program may be tangibly stored in a machine-readable storage media or device (e.g., program memory or magnetic disk) readable by a general or special purpose programmable computer, for configuring and controlling operation of a computer when the storage media or device is read by the computer to perform the procedures described herein. The inventive system may also be considered to be embodied in a computer-readable storage medium, configured with a computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner to perform the functions described herein.

A data processing system suitable for storing and/or executing program code may include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code to reduce the number of times code is retrieved from bulk storage during execution. Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) may be coupled to the system either directly or through intervening I/O controllers.

Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modem and Ethernet cards are just a few of the currently available types of network adapters.

The foregoing is to be understood as being in every respect illustrative and exemplary, but not restrictive, and the scope of the invention disclosed herein is not to be determined from the Detailed Description, but rather from the claims as interpreted according to the full breadth permitted by the patent laws. It is to be understood that the embodiments shown and described herein are only illustrative of the principles of the present invention and that those skilled in the art may implement various modifications without departing from the scope and spirit of the invention. Those skilled in the art could implement various other feature combinations without departing from the scope and spirit of the invention. Having thus described aspects of anomaly detection in streaming networks, with the details and particularity required by the patent laws, what is claimed and desired protected by Letters Patent is set forth in the appended claims. 

What is claimed is:
 1. A streaming graph display system with anomaly detection, the system comprising: a reciever to receive data or signals for creating a streaming graph; a processing system including a processor and memory coupled to the processor, the processing system programmed to: receive a plurality of vertices and edges to create the streaming graph and identify an anomaly in the streaming graph based on a distance between edge codes and all current cluster centers determined by the plurality of vertices and edges; control an operation of a processor-based machine to change a state of the processor-based machine, responsive to the anomaly; and a display to show a user the streaming graph with the anomaly.
 2. The system of claim 1, further comprising one or more sensors capable of detecting a change of state and sending the data or the signals to the display system.
 3. The system of claim 2, wherein the one or more sensors include a sensor selected from the group consisting of a temperature sensor, a contact sensor, and an audio sensor.
 4. The system of claim 1, wherein the one or more sensors sends the data or the signals to the display system.
 5. The system of claim 1, further comprising a speaker that sounds an alarm when controlled by the processing system.
 6. The system as recited in claim 1, wherein the processing system is further programmed to employ a skip-gram model.
 7. The system as recited in claim 6, wherein the skip-gram model transforms the plurality of vertices and edges into vectors.
 8. The system as recited in claim 1, wherein the processing system is further programmed to employ a hierarchical softmax or a negative sampling.
 9. The system as recited in claim 8, wherein the hierarchical softmax or the negative sampling limit a number of vectors employed in generating graph codes.
 10. The system as recited in claim 1, wherein the processing system is further programmed to build a look-up table for determining edge codes in real-time.
 11. The system as recited in claim 1, wherein the processing system is further programmed to form cluster centers of existing edge codes.
 12. The system as recited in claim 1, wherein the processing system is further programmed to employ a temporal clustering feature vector.
 13. A computer-implemented method for a streaming graph display system with anomaly detection, the method comprising: receive, by a processor, data or signals for creating a streaming graph; creating, by the processor, a streaming graph from a plurality of vertices and edges in the data or the signals; identifying, by the processor, an anomaly in the streaming graph based on a distance between edge codes and all current cluster centers determined by the plurality of vertices and edges; controlling, by the processor, an operation of a processor-based machine to change a state of the processor-based machine, responsive to the anomaly; and displaying the streaming graph with the anomaly to a user.
 14. The computer-implemented method as recited in claim 13, wherein the identifying step employs a skip-gram model.
 15. The computer-implemented method as recited in claim 14, wherein the skip-gram model transforms the plurality of vertices and edges into vectors.
 16. The computer-implemented method as recited in claim 13, wherein the identifying step employs a hierarchical softmax or a negative sampling.
 17. The computer-implemented method as recited in claim 16, wherein the hierarchical softmax or the negative sampling limit a number of vectors employed in generating graph codes.
 18. The computer-implemented method as recited in claim 13, wherein the identifying step builds a look-up table for determining edge codes in real-time.
 19. The computer-implemented method as recited in claim 13, wherein the identifying step includes forming cluster centers of existing edge codes.
 20. A computer program product for a streaming graph display system with anomaly detection, the computer program product comprising a non-transitory computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computer to cause the computer to perform a method comprising: receive, by a processor, data or signals for creating a streaming graph; creating, by the processor, a streaming graph from a plurality of vertices and edges in the data or the signals; identifying, by the processor, an anomaly in the streaming graph based on a distance between edge codes and all current cluster centers determined by the plurality of vertices and edges; controlling, by the processor, an operation of a processor-based machine to change a state of the processor-based machine, responsive to the anomaly; and displaying the streaming graph with the anomaly to a user. 